﻿@model iKnow.Models.Article

@{
    ViewBag.Title = "Create";
}
<div>
    <div class="dialog" title="Upload an image">
        <div>
            @using (Html.BeginForm("image", "upload", FormMethod.Post, new { id = "imageForm", @class = "ajax-form", @enctype = "multipart/form-data" }))
            {
                <input type="file" name="file" />
                <br /><br /><br />
                <a href="#" onclick="$('#imageForm').submit(); return false;" class="button">Insert Image</a>
            }
        </div>
    </div>

    @using (Html.BeginForm("Create", "Home", FormMethod.Post, new { id = "createForm" }))
    {
        @Html.HiddenFor(m => m.Title)
        @Html.TextAreaFor(m => m.Text)

        <br /><br />
        <a href="#" onclick="$('#createForm').submit(); return false;" class="button">Create Article</a>
        <br /><br />
    }
</div>
